Skip to content

feat(mcp): include inbound admission counters in list_records - #504

Merged
lxsaah merged 1 commit into
mainfrom
claude/vigilant-planck-ezn02w
Nov 26, 2026
Merged

lxsaah merged 1 commit into
mainfrom
claude/vigilant-planck-ezn02w

Conversation

@lxsaah

@lxsaah lxsaah commented Nov 25, 2026

Copy link
Copy Markdown
Member

Description

AimX record.list returns inbound_routes for each record: each inbound link's ingress counters (accepted, upgraded, too_new, shape_mismatch, malformed, decode_error, …). The MCP tool list_records dropped this field, so an agent could not see why values on a link were being rejected.

  • aimdb-mcp: RecordInfo gets an inbound_routes field, copied unchanged from record.list. It is omitted when empty, as in the server's metadata. The MCP crate always builds the client with observability, so the field is always available, --public mode included (it is read-only).
  • aimdb-client: re-exports InboundRouteMetrics and InboundRouteStats under observability. They are the types of the existing RecordMetadata::inbound_routes field, and the re-export saves MCP a direct aimdb-core dependency.
  • The list_records tool description, the MCP README and the changelogs of both crates mention the field.

get_record is unchanged. It returns only {value, ts}, with no metadata.

Tests: two unit tests on RecordInfo serialisation. One checks that the counters are included; the other checks that the field is omitted when there are no inbound links. There is no end-to-end test that injects a too_new frame over a real inbound link. The counters are produced in aimdb-core, and this change only passes them through.

Related Issue

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding standards.
  • I have added tests to cover my changes.
  • All new and existing tests passed (make check). I did not run the full target. Ran: aimdb-mcp tests, clippy -D warnings on aimdb-mcp and aimdb-client (with and without observability), cargo check -p aimdb-client --no-default-features, cargo fmt --check.
  • I have updated the documentation accordingly.

Generated by Claude Code

`record.list` returns `inbound_routes` for each record, the per-link
ingress counters (accepted, upgraded, too_new, shape_mismatch, ...),
but the MCP `list_records` tool dropped them, so an agent could not see
why values on an inbound link were rejected.

Pass the field through unchanged, omitted when empty as in the
metadata. aimdb-client re-exports `InboundRouteMetrics` and
`InboundRouteStats`, the field's types, under `observability`.

Fixes #494

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WGkDJ9KUrNCqA8p5JA2Hyo
@lxsaah
lxsaah merged commit 9057ed6 into main Nov 26, 2026
10 checks passed
@lxsaah
lxsaah deleted the claude/vigilant-planck-ezn02w branch November 26, 2026 03:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] aimdb-mcp: include inbound admission counters in list_records

2 participants